package com.shiguiwu.springmybatis.spring.scheduled;

import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * @description: haha
 * @author: stone
 * @date: Created by 2021/6/11 19:43
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springmybatis.spring.scheduled
 */
@Service
public class ScheduledService {

    //@Scheduled(fixedRate = 1000)
    //@Scheduled(cron = "0 0 2 * * ?")
    @Scheduled(cron = "0 0 0/2 * * ? ")
    @Async
    public void m1() {
        System.out.println(Thread.currentThread().getName() + "........");

    }
}
